package com.lfz.demo.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.apache.poi.ss.formula.functions.T;
import org.springframework.format.annotation.DateTimeFormat;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import java.io.Serializable;
import java.util.Date;

/**
 * @author lfz
 * @date 2025/3/13 17:20
 */
@Data
@TableName("logs")
@AllArgsConstructor
@NoArgsConstructor
@Entity
@Builder
public class Logs implements Serializable {
    @Id
    @TableId(type = IdType.AUTO)
    private Integer id;
    // 指定日期格式
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date operateTime;           // 操作时间
    private String operateMenu;         // 操作菜单
    private String ip;                  // 操作人ip
    private String operator;            // 操作人
    private String operateType;         // 操作类型
    private String operateDetail;       // 操作详情

}
